// pages/edu/my/exam/index.js
import{ExamJobs} from '../../model/exam_jobs';
const ExamJobsModel=new ExamJobs();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:null,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this._getExamQuestionUser()
  },

  // --------------------------

  /**
   * 获取我的考核
   */
  _getExamQuestionUser(){
    ExamJobsModel.getExamQuestionUser((res)=>{
      this.setData({
        list:res
      })
    })
  },
  
  /**
   *  重新考核
   * @param {*} e 
   */
  onAgain(e){
    let id=e.currentTarget.dataset.id
    console.log(e)
    if(id){
      wx.navigateTo({
        url: '../../exam/exam/index?id='+id
      })
    }
    
  }

})